#!/bin/bash

# 创建3个500M的零填充文件
./create_files.sh zero 2G zero_file

# 创建3个2G的随机数据文件
./create_files.sh random 1G random_file

# 创建3个100M的字符'A'填充文件
./create_files.sh char 2M char_file

# 创建3个50M的自定义文本填充文件
./create_files.sh text 2M text_file "Hello World! "

for i in `ls *.dat`; do
	md5sum $i > $i-md5.txt;
done

for i in `ls *-md5.txt`;do
	cat $i >> all-check.txt;
done

docker build -t tst-lazy-pull:latest -f Dockerfile.lazy .
docker build -t tst-depdup:v1.0 -f Dockerfile.depdup .
echo 1234 > diff.txt
docker build -t tst-depdup:v2.0 -f Dockerfile.depdup .
docker build -t test-python -f  Dockerfile.python .

rm -rf *.dat *.txt

docker tag tst-lazy-pull:latest godnf/tst-lazy-pull:latest
docker push godnf/tst-lazy-pull:latest
docker tag tst-depdup:v1.0 godnf/tst-depdup:v1.0
docker push godnf/tst-depdup:v1.0
docker tag tst-depdup:v2.0 godnf/tst-depdup:v2.0
docker push godnf/tst-depdup:v2.0

docker tag test-python::latest godnf/test-python::latest
docker push godnf/test-python::latest
